// import Vue from "vue";

var getStyle = function(item) {
  let debug, topRate;
  if (process.env.NODE_ENV == "development") {
    debug = {
      backgroundColor: "red"
    };
  }
  if (window.screen.height <= 1050) {
    // 1050
    topRate = 115;
  } else if (window.screen.height <= 1080) {
    // 1080
    topRate = 122;
  } else {
    topRate = 120;
  }

  return {
    left: (item.left / 1920) * 100 + "%",
    top: (item.top / 1080) * topRate + "%",
    width: (item.width / 1080) * 100 + "vw",
    height: (item.height / 1080) * 100 + "vw",
    ...debug
  };
};

export default getStyle;
